// EngineTest2CLR.h

#pragma once

using namespace System;

#include "..\Engine\Engine.h"

namespace EngineTest2CLR {

	// CLR Bitboard Containers
	public ref class CLRBitBoard
	{
	public:
		unsigned int wm;
		unsigned int bm;
		unsigned int wk;
		unsigned int bk;
	};

	public ref class CLRBitBoard64
	{
	public:
		unsigned long long wm;
		unsigned long long bm;
		unsigned long long wk;
		unsigned long long bk;
	};

	 // CLR Wrapper class for engine
	////////////////////////////////////////////
	public ref class CLREngineWrapper
	{
	public:
		CLREngineWrapper();

		// bitboard conversion methods
		CLRBitBoard^ ToCLRBitBoard(BitBoard bb);
		CLRBitBoard64^ ToCLRBitBoard64(BitBoard64 bb);
		BitBoard ToEngineBitBoard(CLRBitBoard^ cbb);
		BitBoard64 ToEngineBitBoard64(CLRBitBoard64^ cbb);

		// logging interface
		int LogInit(String^ filename);
		void LogMessage(int logId, String^ msg);
		void LogBB(int logId, CLRBitBoard^ cbb);
		void LogBB64(int logId, CLRBitBoard64^ cbb);
		void LogClose(int logId);

		// bitboard generators proxy
		array<CLRBitBoard^>^ EnglishBBGen(CLRBitBoard^ cbb, bool bWhite);
		array<CLRBitBoard64^>^ InternationalBBGen(CLRBitBoard64^ cbb, bool bWhite);
	};

}
